package model

// by daoyi
import "time"

type OrderList struct {
	Id          uint      `gorm:"primary_key"`
	CreatedAt   string    `gorm:"column:create_at;default:null"`
	UpdatedAt   string    `gorm:"column:update_at;default:null"`
	DeletedAt   time.Time `gorm:"index"`
	OrderNo     string    `gorm:"column:order_no;comment:订单号"`
	GoodsId     uint      `gorm:"column:goods_id;comment:产品型号id"`
	Price       float64   `gorm:"type:decimal(10,2);column:price;comment:实际采购价"`
	YuPrice     float64   `gorm:"type:decimal(10,2);column:yu_price;comment:预购价"`
	Num         uint      `gorm:"column:num;comment:数量"`
	CgStatus    uint      `gorm:"column:cg_status;default:2;comment:1采购完成，2未采购，3采购中，4物流中，5物流已到货"`
	CgTime      string    `gorm:"column:cg_time;comment:采购时间"`
	CgDuty      string    `gorm:"column:cg_duty;comment:采购责任人"`
	LogisticsId uint      `gorm:"column:logistics_id;comment:物流id"`
	ContractNo  string    `gorm:"column:contract_no;comment:合同编号"`
	SellTudy    string    `gorm:"column:sell_tudy;comment:出库员"`
	SellNum     uint      `gorm:"column:sell_num;comment:已出库数量"`
	SellTime    string    `gorm:"column:sell_time;comment:出库时间"`
	DaoNum      uint      `gorm:"column:dao_num;comment:已到货数量"`
	IsType      uint      `gorm:"column:is_type;default:1;comment:采购类型：1原始订单，2增补，3变更修改"`
	ol_id       uint      `gorm:"column:ol_id;comment:当采购类型为3时，此id为原采购品详情单order_list的id"`
}
